package com.sdnu.service.controller;


import com.sdnu.common.Result.R;
import com.sdnu.service.entity.UcenterClazz;
import com.sdnu.service.service.UcenterClazzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Zhao YunLai
 * @since 2022-03-20
 */
@RestController
@RequestMapping("/service/ucenter-clazz")
@CrossOrigin
public class UcenterClazzController {

    @Autowired
    private UcenterClazzService ucenterClazzService;

    @PostMapping("add")
    public R add(@RequestBody UcenterClazz ucenterClazz){

        Boolean b = ucenterClazzService.addClazz(ucenterClazz);

        return b?R.ok():R.error();
    }


}

